1. Field of the Invention
This application relates to microcontroller architecture, and more particularly to a programmable interrupt controller.
2. Description of the Related Art
A typical interrupt controller has 8 input lines that take requests from one of 8 different devices. The controller then passes the request on to the processor, telling it which device issued the request (which interrupt number triggered the request, from 0 to 7). The original PC and XT systems had one of these controllers, and hence supported interrupts 0 to 7 only.
Starting with the IBM AT, a second interrupt controller was added to the system to expand it; this was part of the expansion of the ISA system bus from 8 to 16 bits. In order to ensure compatibility, the designers of the AT didn""t want to change the single interrupt line going to the processor. So what they did instead was to cascade the two interrupt controllers together.
The first interrupt controller still has 8 inputs and a single output going to the processor. The second one has the same design, but it takes 8 new inputs (doubling the number of interrupts) and output its single feed into input line 2 of the first controller. If any of the inputs on the second controller become active, the output from that controller triggers interrupt #2 on the first controller, which then signals the processor.
Briefly, the illustrative system provides an interrupt controller with the flexibility to provide a PC/AT-compatible or non-PC/AT-compatible embedded environment. Multiple slave controllers together with a master controller are combined with a multi-channel routing switch matrix. Flexibility is provided through interrupt sharing and selective slave controller disabling. The switch matrix, under software control, directs the multiple interrupt signals from internal and external sources to any priority channel of the multi-stage interrupt controller. Configuration of the switch matrix may be performed upon initialization or during run time. The switch matrix, slave controllers and master controller cascade formation may be configured to utilize a large number of interrupt channels or alternatively, to operate under PC/AT compatibility using a reduced number of interrupt channels.